sample_list = ['a',1,333,2,('a','b')]
sample_list2 = ['a','b',0,1,3]

print sample_list[0]    ##a
print sample_list[-1] 	##('a', 'b')

del sample_list[2]
print sample_list
##['a', 1, 2, ('a', 'b')]

sample_list.insert(1,'love')
print sample_list
##['a', 'love', 1, 2, ('a', 'b')]

sample_list[2:4] = ['kathy','kathy']
print sample_list
##['a', 'love', 'kathy', 'kathy', ('a', 'b')]

for element in sample_list:
	print element,
print
##a love kathy kathy ('a', 'b')

sample_list.append('haha')
print sample_list
##['a', 'love', 'kathy', 'kathy', ('a', 'b'), 'haha']

print sample_list.pop(5)##haha
print sample_list
##['a', 'love', 'kathy', 'kathy', ('a', 'b')]

print 'the count of kathy is %d' %(sample_list.count('kathy'))
##the count of kathy is 2

sample_list.remove('kathy')
print sample_list
##['a', 'love', 'kathy', ('a', 'b')]

sample_list.extend(sample_list2)
##['a', 'love', 'kathy', ('a', 'b'), 'a', 'b', 0, 1, 3]
print sample_list

sample_list.reverse()
print sample_list
##[3, 1, 0, 'b', 'a', ('a', 'b'), 'kathy', 'love', 'a']

sample_list.sort()
##[0, 1, 3, 'a', 'a', 'b', 'kathy', 'love', ('a', 'b')]
print sample_list

print sample_list[1:4]
##[1, 3, 'a']

del sample_list[1:3]
print sample_list
##[0, 'a', 'a', 'b', 'kathy', 'love', ('a', 'b')]

sample_listCopy = sample_list    ##the two lists point the the same memory
print sample_listCopy
##[0, 'a', 'a', 'b', 'kathy', 'love', ('a', 'b')]

del sample_listCopy[0]
print sample_listCopy##['a', 'a', 'b', 'kathy', 'love', ('a', 'b')]
print sample_list##['a', 'a', 'b', 'kathy', 'love', ('a', 'b')]

sample_listCopy = sample_list[:]  ##copy
print sample_listCopy
##['a', 'a', 'b', 'kathy', 'love', ('a', 'b')]

del sample_listCopy[0]
print sample_listCopy##['a', 'b', 'kathy', 'love', ('a', 'b')]
print sample_list##['a', 'a', 'b', 'kathy', 'love', ('a', 'b')]

print ['kathy','love']+['python',88]*2
##['kathy', 'love', 'python', 88, 'python', 88]


